/**
 * 
 */
package hsh.gui.comodo;

import java.util.ArrayList;

import javax.swing.ImageIcon;
import javax.swing.JLabel;

/**
 * @author root
 *
 */
public abstract class Comodo {

	protected JLabel  iconMain;
	
	protected ArrayList<JLabel> trash;
	
	protected int lastTrashRemoved;
	
	public Comodo( JLabel  iconMain) {
		this.iconMain = iconMain;
		this.iconMain.setLayout(null);
	}
	
	public void trashNow(){
	   this.lastTrashRemoved = trash.size();
		for(int i=0;i<trash.size();i++){
			iconMain.add(trash.get(i));
			System.out.println("sujou");
			iconMain.updateUI();
		}
		
		
	}
	
	public void clean(){
		iconMain.remove(trash.get(lastTrashRemoved));
		this.lastTrashRemoved--;
	}
	
	
	public abstract void buildComodo();
	
	
}
